Skip to main content
POST
/
preview
/
fleet
/
drivers
/
create-auth-token
[preview] Create auth token for a driver
curl --request POST \
  --url https://api.samsara.com/preview/fleet/drivers/create-auth-token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "dp[gZc1wAigz4uGa0Hh",
  "externalId": "payrollId:ABFS18600",
  "id": 1234,
  "username": "johndoe"
}
'
{
  "data": {
    "expirationTime": 1710000000000,
    "token": "ZmFrZVRva2VuXzMyQnl0ZXNMb25nRm9yVGVzdA"
  }
}

Documentation Index

Fetch the complete documentation index at: https://samsara-showcase.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for creating a driver auth token. One of id, externalId, or username is required.

code
string
required

Required. Random 12+ character string, used with the auth token to help secure the client from intercepted tokens.

Minimum string length: 12
Example:

"dp[gZc1wAigz4uGa0Hh"

externalId
string

Optional. External ID of the driver, in the format key:value (e.g., payrollId:ABFS18600). One of id, externalId, or username is required.

Example:

"payrollId:ABFS18600"

id
integer<int64>

Optional. Samsara ID of the driver. One of id, externalId, or username is required.

Example:

1234

username
string

Optional. Username of the driver. This is the login identifier configured when the driver is created. One of id, externalId, or username is required.

Example:

"johndoe"

Response

OK response.

data
object
required

Response object for create driver auth token